package com.wave2.shadow.persistence;

import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

/*
 * This wrapper class is necessary because the webservices uses JAXB which cannot marshal a List of objects directly.
 */

@XmlRootElement (name = "EventsList")
public class EventsList implements java.io.Serializable{
	private List<Event> events;

	public EventsList(){
	}
	
	public EventsList(List<Event> events){
		this.events = events;
	}
	
	public List<Event> getEvents() {
		return events;
	}

	public void setEvents(List<Event> events) {
		this.events = events;
	}

	@Override
	public boolean equals(Object obj) {
		boolean retVal = false;
		
		if (obj instanceof EventsList){
			retVal = ((EventsList) obj).getEvents().equals(this.events);
		}
		
		 return retVal;
	}
	
	
}
